﻿
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 设备信息基础输入参数
    /// </summary>
    public class DeviceInfoBaseInput
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public virtual string DeviceName { get; set; }
        
        /// <summary>
        /// 设备编号
        /// </summary>
        public virtual string DeviceNo { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        public virtual string Description { get; set; }
        
        /// <summary>
        /// 地址
        /// </summary>
        public virtual string Address { get; set; }
        
        /// <summary>
        /// 位置
        /// </summary>
        public virtual string Position { get; set; }
        
        /// <summary>
        /// 位置类型
        /// </summary>
        public virtual DevicePositionType DevicePositionType { get; set; }
        
        /// <summary>
        /// 图片URL
        /// </summary>
        public virtual string ImageUrl { get; set; }
        
        /// <summary>
        /// 设备网关ID
        /// </summary>
        public virtual long DeviceGateWayId { get; set; }
        
        /// <summary>
        /// 设备模板ID
        /// </summary>
        public virtual long DeviceTemplateInfoId { get; set; }
        
        /// <summary>
        /// 直属机构Id
        /// </summary>
        public virtual long OrgId { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }

        public virtual List<DeviceRelSlave> DeviceRelSlaves { get; set; }
        
    }

    /// <summary>
    /// 设备信息分页查询输入参数
    /// </summary>
    public class PageDeviceInfoInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string? DeviceName { get; set; }
        
        /// <summary>
        /// 设备编号
        /// </summary>
        public string? DeviceNo { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        public string? Description { get; set; }
        
        /// <summary>
        /// 地址
        /// </summary>
        public string? Address { get; set; }
        
        /// <summary>
        /// 位置
        /// </summary>
        public string? Position { get; set; }
        
        /// <summary>
        /// 位置类型
        /// </summary>
        public DevicePositionType? DevicePositionType { get; set; }
        
        /// <summary>
        /// 设备网关ID
        /// </summary>
        public long? DeviceGateWayId { get; set; }
        
        /// <summary>
        /// 设备模板ID
        /// </summary>
        public long? DeviceTemplateInfoId { get; set; }
        
        /// <summary>
        /// 直属机构Id
        /// </summary>
        public long? OrgId { get; set; }
        
    }

    /// <summary>
    /// 设备信息增加输入参数
    /// </summary>
    public class AddDeviceInfoInput : DeviceInfoBaseInput
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        [Required(ErrorMessage = "设备名称不能为空")]
        public override string DeviceName { get; set; }
        
        /// <summary>
        /// 设备编号
        /// </summary>
        [Required(ErrorMessage = "设备编号不能为空")]
        public override string DeviceNo { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        [Required(ErrorMessage = "描述不能为空")]
        public override string Description { get; set; }
        
        /// <summary>
        /// 地址
        /// </summary>
        [Required(ErrorMessage = "地址不能为空")]
        public override string Address { get; set; }
        
        /// <summary>
        /// 位置
        /// </summary>
        [Required(ErrorMessage = "位置不能为空")]
        public override string Position { get; set; }
        
        /// <summary>
        /// 位置类型
        /// </summary>
        [Required(ErrorMessage = "位置类型不能为空")]
        public override DevicePositionType DevicePositionType { get; set; }
        
        /// <summary>
        /// 设备网关ID
        /// </summary>
        [Required(ErrorMessage = "设备网关ID不能为空")]
        public override long DeviceGateWayId { get; set; }
        
        /// <summary>
        /// 设备模板ID
        /// </summary>
        [Required(ErrorMessage = "设备模板ID不能为空")]
        public override long DeviceTemplateInfoId { get; set; }
        
        /// <summary>
        /// 直属机构Id
        /// </summary>
        [Required(ErrorMessage = "直属机构Id不能为空")]
        public override long OrgId { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 设备信息删除输入参数
    /// </summary>
    public class DeleteDeviceInfoInput : BaseIdInput
    {
    }

    /// <summary>
    /// 设备信息更新输入参数
    /// </summary>
    public class UpdateDeviceInfoInput : DeviceInfoBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }

      
    }

    /// <summary>
    /// 设备信息主键查询输入参数
    /// </summary>
    public class QueryByIdDeviceInfoInput : DeleteDeviceInfoInput
    {

    }
